import request from "@/utils/request";

export function getInitalizations(paramters) {
  return request({
    url: "api/v1/accounts/balances/initialization",
    method: "get",
    params: paramters,
    authServer: false,
  });
}

export function getAccountInitalizations(accountId) {
  return request({
    url: "api/v1/accounts/balances/initialization/" + accountId,
    method: "get",
    authServer: false,
  });
}

export function addAccountInitalizations(data) {
  return request({
    url: "api/v1/accounts/balances/initialization",
    method: "post",
    data: data,
    authServer: false,
  });
}

export function updateAccountInitalizations(data) {
  return request({
    url: "api/v1/accounts/balances/initialization",
    method: "put",
    data: data,
    authServer: false,
  });
}

export function trialBalance() {
  return request({
    url: "api/v1/accounts/balances/initialization/trial",
    method: "get",
    authServer: false,
  });
}

export function deleteAccountBalance(id) {
  return request({
    url: "api/v1/accounts/balances/" + id,
    method: "delete",
    authServer: false,
  });
}

export function clearBalances() {
  return request({
    url: "api/v1/accounts/balances/initialization",
    method: "delete",
    authServer: false,
  });
}
